<?php
/**
 * @var \Ke\Web\Context $this
 * @var \Ke\Web\Web     $web
 * @var string          $content
 */

$page = $page ?? 0;
$page += 1;
$pageSize = $pageSize ?? 10;
$pageCount = $pageCount ?? 0;
?>
<div>
<?php if ($this->pageCount > 0) { ?>
	<form class="mini ui form" method="get">
		<div class="fields">
			<div class="inline field">
				<label for="page_number">分页 : </label>
				<select id="page_number" name="page" class="ui dropdown">
					<?php for ($i = 1; $i <= $pageCount; $i++) { ?>
						<option value="<?php print $i; ?>"<?php print $i === $page ? ' selected="selected"' : '' ?>><?php print $i; ?></option>
					<?php } ?>
				</select>
				/ <?php print $pageCount; ?>
				<button class="ui primary button">跳转</button>
			</div>
		</div>
	</form>
<?php } ?>

</div>